﻿@model List<Nop.Web.Models.Catalog.CategoryModel>
<script type="text/javascript">
    function tabSel(item) {
        $(item).siblings().find("#shop_div").hide();
        $(item).find("#shop_div").show();
    }
</script>
@foreach (var category in Model)
{
     if (category.RecmdProducts.Count > 0)
     {
         
        <div class="mod_tuijian">
        <div class="mod_tuijian_title">
            <b>@Html.Raw(category.SeName + "推荐")</b>
            <span>
           
            <a href="@category.RecmdProducts[0].Manufacturer.Id">更多</a>
            
            </span>
            </div>

        <div class="mod_tuijian_pr">
            @foreach (var product in category.RecmdProducts)
            {
                <ul>
                    <li class="tuijian_pr">
                        <div class="tuijian_pr_pf">
                            <ul>
                                <li><a href="@Url.RouteUrl("ProductBuy", new { productId = product.Id })">
                                    <img style=" width:310px; height:234px;" src="@product.DefaultPictureModel.FullSizeImageUrl"></a></li>
                                <li><b class="tuijian_pr_sp_mc"><a href="@Url.RouteUrl("ProductBuy", new { productId = product.Id })">@product.Name</a></b>
                                    <img src="@Url.Content("~/themes/Cnet/Content/image/xx.png")">
                                    <img src="@Url.Content("~/themes/Cnet/Content/image/xx.png")">
                                    <img src="@Url.Content("~/themes/Cnet/Content/image/xx.png")">
                                    <img src="@Url.Content("~/themes/Cnet/Content/image/xx.png")">
                                </li>
                                <li><span style="margin-left:5px;"><b class="font05">￥@product.ProductPrice.Price</b></span>
                                <span class="tuijian_cjs">@Html.Raw("共" + product.TradingVolume + "人成交")</span></li>
                                <li class="font09"><span style="margin-left:5px;"><a href="@Url.Action("shop", "shop", new { id = product.Manufacturer.Id })">@(product.Manufacturer == null ? "--" : product.Manufacturer.Name)</a></span></li>
                            </ul>
                        </div>
                    </li>
                </ul>
            }
        </div>
     
        <div class="mod_tuijian_pr_right">
            <div class="mod_tuijian_pr_right_title">
                <b>@Html.Raw("本周" + category.SeName + "热门")</b>
                </div>
           @if (category.HotProducts.Count > 0)
            {
              int i = 1;
              foreach (var product in category.HotProducts)
              {
                  if (i == 1)
                  {
                <div class="mod_tuijian_pr_right_one" onclick="tabSel(this)"  style="cursor:pointer">
                    <ul>
                        <li><span><img src="@Url.Content("~/themes/Cnet/Content/image/"+i+".png")"></span>
                        <span class="one_caiming"><a href="@Url.RouteUrl("ProductBuy", new { productId = product.Id })">@product.Name</a></span><span class="one_jg">@Html.Raw("￥" + product.ProductPrice.Price)</span></li>
                        <li id="shop_div"><span class="one_mc"><a href="@Url.Action("shop", "shop", new { id = product.Manufacturer.Id })">@(product.Manufacturer == null ? "--" : product.Manufacturer.Name)</a></span><span
                            class="one_xd">@Html.Raw("下单：" + product.TradingVolume)</span> <b class="font05"><a href="@Url.RouteUrl("ProductBuy", new { productId = product.Id })">
                                点击购买</a></b> </li>
                    </ul>
                </div>
                  }
                  else
                  {
                <div class="mod_tuijian_pr_right_one"  onclick="tabSel(this)" style="cursor:pointer">
                    <ul>
                        <li>

                         <span><img src="@Url.Content("~/themes/Cnet/Content/image/"+i+".png")"></span>
                         <span class="one_caiming"><a href="@Url.RouteUrl("ProductBuy", new { productId = product.Id })">@product.Name</a></span>
                         <span class="one_jg">￥@product.ProductPrice.Price</span>
                         

                        </li>
                        <li id="shop_div" style="display: none"><span class="one_mc"><a href="@Url.Action("shop", "shop", new { id = product.Manufacturer.Id })">@(product.Manufacturer == null ? "--" : product.Manufacturer.Name)</a></span><span
                            class="one_xd">@Html.Raw("下单：" + product.TradingVolume)</span> <b class="font05"><a href="@Url.RouteUrl("ProductBuy", new { productId = product.Id })">
                                点击购买</a></b> </li>
                    </ul>
                </div>
                  }
                  i++;
              }
            }
        </div>
      </div>
    
    }
}
<div class="mod_bottom_wz" style="float:left; width:1196px; height:55px;"></div>
